package com.specialized.coupon.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.specialized.coupon.mapper.CouponSessionMapper;
import com.specialized.coupon.domain.CouponSession;
import com.specialized.coupon.service.ICouponSessionService;

/**
 * 优惠卷场次关系Service业务层处理
 *
 * @author djh
 * @date 2024-07-30
 */
@Service
public class CouponSessionServiceImpl implements ICouponSessionService {
    @Autowired
    private CouponSessionMapper couponSessionMapper;

    /**
     * 查询优惠卷场次关系
     *
     * @param couponSessionId 优惠卷场次关系主键
     * @return 优惠卷场次关系
     */
    @Override
    public CouponSession selectCouponSessionByCouponSessionId(Long couponSessionId) {
        return couponSessionMapper.selectCouponSessionByCouponSessionId(couponSessionId);
    }

    /**
     * 查询优惠卷场次关系列表
     *
     * @param couponSession 优惠卷场次关系
     * @return 优惠卷场次关系
     */
    @Override
    public List<CouponSession> selectCouponSessionList(CouponSession couponSession) {
        return couponSessionMapper.selectCouponSessionList(couponSession);
    }

    /**
     * 新增优惠卷场次关系
     *
     * @param couponSession 优惠卷场次关系
     * @return 结果
     */
    @Override
    public int insertCouponSession(CouponSession couponSession) {
            return couponSessionMapper.insertCouponSession(couponSession);
    }

    /**
     * 修改优惠卷场次关系
     *
     * @param couponSession 优惠卷场次关系
     * @return 结果
     */
    @Override
    public int updateCouponSession(CouponSession couponSession) {
        return couponSessionMapper.updateCouponSession(couponSession);
    }

    /**
     * 批量删除优惠卷场次关系
     *
     * @param couponSessionIds 需要删除的优惠卷场次关系主键
     * @return 结果
     */
    @Override
    public int deleteCouponSessionByCouponSessionIds(Long[] couponSessionIds) {
        return couponSessionMapper.deleteCouponSessionByCouponSessionIds(couponSessionIds);
    }

    /**
     * 删除优惠卷场次关系信息
     *
     * @param couponSessionId 优惠卷场次关系主键
     * @return 结果
     */
    @Override
    public int deleteCouponSessionByCouponSessionId(Long couponSessionId) {
        return couponSessionMapper.deleteCouponSessionByCouponSessionId(couponSessionId);
    }


    @Override
    public List<CouponSession> findCouponSession(CouponSession couponSession) {
        List<CouponSession> couponSessionList = couponSessionMapper.findCouponSession(couponSession);
        return couponSessionList;
    }







}
